Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: AttributeError crashed VM teardown #183

Merged
merged 1 commit into from
May 11, 2022
Merged

Fix: AttributeError crashed VM teardown #183

merged 1 commit into from
May 11, 2022

Conversation

hoh
Copy link
Member

@hoh hoh commented May 11, 2022

During VM teardown, the field AlephFirecrackerVM().guest_api_process._popen
could be None, and the following traceback be raised:

  File "/root/aleph-vm/vm_supervisor/models.py", line 116, in create
    await vm.teardown()
  File "/root/aleph-vm/vm_supervisor/vm/firecracker_microvm.py", line 429, in teardown
    await self.stop_guest_api()
  File "/root/aleph-vm/vm_supervisor/vm/firecracker_microvm.py", line 424, in stop_guest_api
    self.guest_api_process.terminate()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 133, in terminate
    self._popen.terminate()
AttributeError: 'NoneType' object has no attribute 'terminate'

During VM teardown, the field AlephFirecrackerVM().guest_api_process._popen
could be None, and the following traceback be raised:

```python
  File "/root/aleph-vm/vm_supervisor/models.py", line 116, in create
    await vm.teardown()
  File "/root/aleph-vm/vm_supervisor/vm/firecracker_microvm.py", line 429, in teardown
    await self.stop_guest_api()
  File "/root/aleph-vm/vm_supervisor/vm/firecracker_microvm.py", line 424, in stop_guest_api
    self.guest_api_process.terminate()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 133, in terminate
    self._popen.terminate()
AttributeError: 'NoneType' object has no attribute 'terminate'
```
@hoh hoh added the bug Something isn't working label May 11, 2022
@hoh hoh merged commit 471ab9b into main May 11, 2022
@hoh hoh deleted the hoh-fix-terminate-none branch May 11, 2022 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant